package com.training.project.ui;

import java.util.Scanner;

import com.training.project.entity.Pet;
import com.training.project.util.Seq;

public class Menu {
	private static Scanner sc = new Scanner(System.in);

	public static String optMenu() {
		System.out.println("-----------------");
		System.out.println("1.添加宠物");
		System.out.println("2.显示所有宠物信息");
		System.out.println("0.退出");
		System.out.print("请输入选项: ");
		String opt = sc.nextLine();
		
		return opt;
	}
	public static Pet addPetMenu() {
		System.out.println("类型:");
		String category = sc.nextLine();
		
		System.out.println("品种:");
		String kind = sc.nextLine();
		
		System.out.println("性别:");
		String gender = sc.nextLine();
		
		System.out.println("年龄:");
		int age = Integer.parseInt(sc.nextLine());
		
		System.out.println("体重:");
		Double weight = Double.parseDouble(sc.nextLine());
		
		System.out.println("价格:");
		Double price = Double.parseDouble(sc.nextLine());
		
		Pet pet = new Pet(category, kind, gender, age, weight, price);
		pet.setId(Seq.nextVal());
		
		return pet;
	}
}
